<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MQTT C Client Libraries Internals: MQTTAsync_willOptions Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MQTT C Client Libraries Internals
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">MQTTAsync_willOptions Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="structMQTTAsync__willOptions.html" title="MQTTAsync_willOptions defines the MQTT &quot;Last Will and Testament&quot; (LWT) settings for the client.">MQTTAsync_willOptions</a> defines the MQTT "Last Will and Testament" (LWT) settings for the client.  
 <a href="structMQTTAsync__willOptions.html#details">More...</a></p>

<p><code>#include &lt;MQTTAsync.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:acc521d748a6a9806d8c839075e178a90"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#acc521d748a6a9806d8c839075e178a90">struct_id</a> [4]</td></tr>
<tr class="memdesc:acc521d748a6a9806d8c839075e178a90"><td class="mdescLeft">&#160;</td><td class="mdescRight">The eyecatcher for this structure.  <a href="structMQTTAsync__willOptions.html#acc521d748a6a9806d8c839075e178a90">More...</a><br /></td></tr>
<tr class="separator:acc521d748a6a9806d8c839075e178a90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b53c99ddd236e4b796bb90e035ed30b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#a1b53c99ddd236e4b796bb90e035ed30b">struct_version</a></td></tr>
<tr class="memdesc:a1b53c99ddd236e4b796bb90e035ed30b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The version number of this structure.  <a href="structMQTTAsync__willOptions.html#a1b53c99ddd236e4b796bb90e035ed30b">More...</a><br /></td></tr>
<tr class="separator:a1b53c99ddd236e4b796bb90e035ed30b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19983de96d2ae2df35c588e36200374e"><td class="memItemLeft" align="right" valign="top"><a id="a19983de96d2ae2df35c588e36200374e"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#a19983de96d2ae2df35c588e36200374e">topicName</a></td></tr>
<tr class="memdesc:a19983de96d2ae2df35c588e36200374e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The LWT topic to which the LWT message will be published. <br /></td></tr>
<tr class="separator:a19983de96d2ae2df35c588e36200374e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a4c40ef8b1f73a67326cd9987fd1894"><td class="memItemLeft" align="right" valign="top"><a id="a0a4c40ef8b1f73a67326cd9987fd1894"></a>
const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#a0a4c40ef8b1f73a67326cd9987fd1894">message</a></td></tr>
<tr class="memdesc:a0a4c40ef8b1f73a67326cd9987fd1894"><td class="mdescLeft">&#160;</td><td class="mdescRight">The LWT payload. <br /></td></tr>
<tr class="separator:a0a4c40ef8b1f73a67326cd9987fd1894"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab61a8f7cd82a4cbd919625031b1b51d6"><td class="memItemLeft" align="right" valign="top"><a id="ab61a8f7cd82a4cbd919625031b1b51d6"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#ab61a8f7cd82a4cbd919625031b1b51d6">retained</a></td></tr>
<tr class="memdesc:ab61a8f7cd82a4cbd919625031b1b51d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The retained flag for the LWT message (see <a class="el" href="structMQTTAsync__message.html#a680f5368d5a13ff605466ab6a3d881bd" title="The retained flag serves two purposes depending on whether the message it is associated with is being...">MQTTAsync_message.retained</a>). <br /></td></tr>
<tr class="separator:ab61a8f7cd82a4cbd919625031b1b51d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add4a18313308fec634c69842f6ab9809"><td class="memItemLeft" align="right" valign="top"><a id="add4a18313308fec634c69842f6ab9809"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#add4a18313308fec634c69842f6ab9809">qos</a></td></tr>
<tr class="memdesc:add4a18313308fec634c69842f6ab9809"><td class="mdescLeft">&#160;</td><td class="mdescRight">The quality of service setting for the LWT message (see <a class="el" href="structMQTTAsync__message.html#a6e0971dbde0f04b6dd3bfab97ad5cdb7" title="The quality of service (QoS) assigned to the message.">MQTTAsync_message.qos</a> and <a class="el" href="structMQTTAsync__willOptions.html#add4a18313308fec634c69842f6ab9809">qos</a>). <br /></td></tr>
<tr class="separator:add4a18313308fec634c69842f6ab9809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a359707f9e88d705bce91d482d9816e33"><td class="memItemLeft" >struct {</td></tr>
<tr class="memitem:ae71cec2f128788f2de710c952f6c3bce"><td class="memItemLeft" >
&#160;&#160;&#160;int&#160;&#160;&#160;<a class="el" href="structMQTTAsync__willOptions.html#af6f445357e4993806ceedbe7bafb2c20">len</a></td></tr>
<tr class="memdesc:ae71cec2f128788f2de710c952f6c3bce"><td class="mdescLeft">&#160;</td><td class="mdescRight">binary payload length <br /></td></tr>
<tr class="separator:ae71cec2f128788f2de710c952f6c3bce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a057e66692b3ee97000bf044dcb36abad"><td class="memItemLeft" >
&#160;&#160;&#160;const void *&#160;&#160;&#160;<a class="el" href="structMQTTAsync__willOptions.html#a9e18ae16bb17c09708e7f767390a9638">data</a></td></tr>
<tr class="memdesc:a057e66692b3ee97000bf044dcb36abad"><td class="mdescLeft">&#160;</td><td class="mdescRight">binary payload data <br /></td></tr>
<tr class="separator:a057e66692b3ee97000bf044dcb36abad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a359707f9e88d705bce91d482d9816e33"><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__willOptions.html#a359707f9e88d705bce91d482d9816e33">payload</a></td></tr>
<tr class="memdesc:a359707f9e88d705bce91d482d9816e33"><td class="mdescLeft">&#160;</td><td class="mdescRight">The LWT payload in binary form.  <a href="structMQTTAsync__willOptions.html#a359707f9e88d705bce91d482d9816e33">More...</a><br /></td></tr>
<tr class="separator:a359707f9e88d705bce91d482d9816e33"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="structMQTTAsync__willOptions.html" title="MQTTAsync_willOptions defines the MQTT &quot;Last Will and Testament&quot; (LWT) settings for the client.">MQTTAsync_willOptions</a> defines the MQTT "Last Will and Testament" (LWT) settings for the client. </p>
<p>In the event that a client unexpectedly loses its connection to the server, the server publishes the LWT message to the LWT topic on behalf of the client. This allows other clients (subscribed to the LWT topic) to be made aware that the client has disconnected. To enable the LWT function for a specific client, a valid pointer to an <a class="el" href="structMQTTAsync__willOptions.html" title="MQTTAsync_willOptions defines the MQTT &quot;Last Will and Testament&quot; (LWT) settings for the client.">MQTTAsync_willOptions</a> structure is passed in the <a class="el" href="structMQTTAsync__connectOptions.html" title="MQTTAsync_connectOptions defines several settings that control the way the client connects to an MQTT...">MQTTAsync_connectOptions</a> structure used in the MQTTAsync_connect() call that connects the client to the server. The pointer to <a class="el" href="structMQTTAsync__willOptions.html" title="MQTTAsync_willOptions defines the MQTT &quot;Last Will and Testament&quot; (LWT) settings for the client.">MQTTAsync_willOptions</a> can be set to NULL if the LWT function is not required. </p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a359707f9e88d705bce91d482d9816e33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a359707f9e88d705bce91d482d9816e33">&#9670;&nbsp;</a></span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct { ... }  MQTTAsync_willOptions::payload</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The LWT payload in binary form. </p>
<p>This is only checked and used if the message option is NULL </p>

</div>
</div>
<a id="acc521d748a6a9806d8c839075e178a90"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc521d748a6a9806d8c839075e178a90">&#9670;&nbsp;</a></span>struct_id</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char MQTTAsync_willOptions::struct_id[4]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The eyecatcher for this structure. </p>
<p>must be MQTW. </p>

</div>
</div>
<a id="a1b53c99ddd236e4b796bb90e035ed30b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b53c99ddd236e4b796bb90e035ed30b">&#9670;&nbsp;</a></span>struct_version</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_willOptions::struct_version</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The version number of this structure. </p>
<p>Must be 0 or 1 0 indicates no binary will message support </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>MQTTAsync.h</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Oct 13 2023 18:02:53 for MQTT C Client Libraries Internals by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
